package kocla.com.myapplication;

import android.content.Context;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.widget.Toast;

/**
 * 作者：池锦标 on 2016/9/20 10:28
 * 邮箱：292284583@qq.com
 */
public class DialogTest extends android.app.Dialog {
    public DialogTest(Context context) {
        super(context);
    }

    public DialogTest(Context context, int themeResId) {
        super(context, themeResId);
    }

    protected DialogTest(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }


    public static void showConfig(final Context context, String negative, String title) {
        new AlertDialog.Builder(context).setCancelable(false).setTitle(title).setNegativeButton(negative, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Toast.makeText(context, "hello world", Toast.LENGTH_LONG).show();
            }
        }).show();
    }


}
